<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>登录</title>
    <link rel="stylesheet" href="./css/login.css">
</head>

<body>
    <div class="dowebok">
        <div class="logo"></div>
        <div class="form-item">
            <input id="username" type="text" autocomplete="off" placeholder="邮箱">
            <p class="tip tip1">请输入合法的邮箱地址</p>
        </div>
        <div class="form-item">
            <input id="password" type="password" autocomplete="off" placeholder="登录密码">
            <p class="tip tip2">邮箱或密码不正确</p>
        </div>
        <div class="form-item"><button id="submit">登 录</button></div>
        <div class="reg-bar">
            <a class="reg" href="./register.html">立即注册</a>
            <a class="forget" href="./find.html" onclick="toIndex()">忘记密码</a>
        </div>
    </div>
    <script src="js/jquery.min.js"></script>
    <script>
        $(function () {
            $('#submit').on('click', function () {
                $('.tip').hide()
                if(!$('#username').val()) {
                    $('.tip1').show()
                }
                $('.tip2').show()
            })
        })
        function toIndex() {
            location.href="index.html"
        }
    </script>
</body>

</html>